package moodish.comm.component;

import java.io.Serializable;

import moodish.comm.ServerSideMessage;

/**
 * 
 * This class implements the ServerSideMessage Interface
 * 
 * @author Miguel Rodrigues
 *
 */
@SuppressWarnings("serial")

public class ServerSideMessageComponent implements ServerSideMessage , Serializable{
	
	
	/**
	 * 
	 */

	private String nickname;
	private String payload;
	private ServerSideMessage.Type type;
	
	
	public ServerSideMessageComponent(String nickname, String payload, ServerSideMessage.Type type){
		this.nickname = nickname;
		this.payload = payload;
		this.type = type;
	}
	
	

	@Override
	public Type getType() {
		return type;
	}

	@Override
	public String getPayload() {
		return payload;
	}

	@Override
	public String getClientNickname() {
		return nickname;
	}

}